import { useState, Activity } from "react";

function ActivityMode() {
  const [isVisible, setIsVisible] = useState("visible");

  return (
    <>
      <Activity mode={isVisible}>
        <div>Visible Content</div>
      </Activity>
      <button
        onClick={() =>
          setIsVisible(isVisible === "visible" ? "hidden" : "visible")
        }
      >
        Toggle Visibility
      </button>
    </>
  );
}

export default ActivityMode;
